#include <iostream>
#include <unistd.h>
#include <cstdlib>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
using namespace std;

int main()
{
  int fd = open("nameedpipe", O_RDONLY);

  char rbuffer[1024];
  read(fd, rbuffer, sizeof(rbuffer) - 1);
  cout << rbuffer << endl;

  close(fd);

  return 0;
}
